package com.bolt.admin;

import com.bolt.admin.logging.annotation.EnableLogging;
import com.bolt.support.spring.jpa.repository.ExtBasicJpaRepositoryImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;


@SpringBootApplication(scanBasePackages = {"com.bolt"})
@EnableTransactionManagement
@EntityScan({"com.bolt.**.entity"})
@EnableWebMvc
@EnableJpaRepositories(basePackages={"com.bolt.**.repository"},repositoryBaseClass = ExtBasicJpaRepositoryImpl.class )
@EnableLogging
public class BoltWebApplication  {

    public static void main(String[] args) {
       SpringApplication.run(BoltWebApplication.class, args);
    }
    /**
     * 访问首页提示
     *
     * @return /
     */
    @GetMapping("/")
    public String index() {
        return "Backend service started successfully";
    }
}
